
	local sheets = tree.tags.JobExportData.tags.Sheets.children
	-- Tässä voisi luoda jokaisen productionLotPhasen kohdalle weight-kentän
	local bysoftExport = {}
	for i, sheet in ipairs(sheets) do
		if sheet.tags.Orders then
			local orders = sheet.tags.Orders.children-- 12345/01#01
			for j, order in ipairs(orders) do	
				 -- print(i, j, order.tags.Name.cdata)	
				local temp = {Name = order.tags.Name.cdata, Count = 0, ProductionTime = 0, ProductionTimeEffective = 0, Area = 0, Weight = 0}
				-- bysoftExport[#bysoftExport+1].Name = order.tags.Name.cdata			
				local parts = order.tags.Parts.children
				for k, part in ipairs(parts) do					
						-- print(k, part.tags.Count.cdata, part.tags.ProductionTime.cdata, part.tags.ProductionTimeEffective.cdata)
					temp.Count = temp.Count + tonumber(part.tags.Count.cdata)
					temp.ProductionTime = temp.ProductionTime + tonumber(part.tags.ProductionTime.cdata)
					temp.ProductionTimeEffective = temp.ProductionTimeEffective + tonumber(part.tags.ProductionTimeEffective.cdata)
					temp.Area = temp.Area + tonumber(part.tags.Area.cdata)
					temp.Weight = temp.Weight + tonumber(part.tags.Weight.cdata)
				end
				bysoftExport[#bysoftExport+1] = temp
			end
		end  
	end
	--util.tablePrint(bysoftExport, "bysoftExport")
	return bysoftExport
	
	{"Name":"08069/05#01","Part":[
	{"Area":"11308.477008602067","Weight":"0.35508617807010495","Count":"3","ProductionTime":"1","ProductionTimeEffective":"2"},
	{"Area":"11308.477008602067","Weight":"0.35508617807010495","Count":"3","ProductionTime":"2.1","ProductionTimeEffective":"1"}
	]
	
	muunnettava muotoon:
	
	{"Name":"08069/05#02","Area":"11308.477008602067","Weight":"0.35508617807010495","Count":"6","ProductionTime":"3.1","ProductionTimeEffective":"3"}
	
	from_function: subcombine(Part/Area, "+")
	to: 
	
    {
        "from": "Name",
        "to": "Name"
    },
    {
        "from_function": "subcombine('Part/Area', '+')"
        "to": "Area",
	},
    {
        "from_function": "subcombine('Part/Weight', '+')"
        "to": "Weight",
	},
    {
        "from_static": "Hello World!"
        "to": "info",
	}
	
	
	{"Name":"08069/05#01","Part":[
	{"Area":"11308.477008602067","Weight":"0.35508617807010495","Count":"3","ProductionTime":"1","ProductionTimeEffective":"2"},
	{"Area":"11308.477008602067","Weight":"0.35508617807010495","Count":"3","ProductionTime":"2.1","ProductionTimeEffective":"1"}
	]
	
	
	[
		{"name":"Bysoft Import", "preference":"bysoft_in", "convert_file":"", "in_file":"", "out_file":""},
		{"preference":"ateno_in", "convert_file":"", "in_file":"", "out_file":""},
		{"preference":"ateno_out", "convert_file":"", "in_file":"", "out_file":""}
	]
	